package top.sssd.auth.model.role.converter;

import java.time.LocalDateTime;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import top.sssd.auth.model.role.dto.RoleDto;
import top.sssd.auth.model.role.entity.Role;
import top.sssd.auth.model.role.request.RoleSaveOrUpdateReq;
import top.sssd.auth.model.role.response.RoleResp;


/**
 * @author sssd
 * @description 角色表 Converter转换类
 * @create ${time.now}
 * @version: 1.0.0-SNAPSHOT
 */
@Mapper
public interface RoleConverter {

    RoleConverter INSTANCE = Mappers.getMapper(RoleConverter.class);

    RoleResp entityToResp(Role role);

    Role saveOrUpdateRoleReqToEntity(RoleSaveOrUpdateReq roleSaveOrUpdateReq);

    Role dtoToEntity(RoleDto roleDto);

    RoleDto entityToDto(Role role);

}

